/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package skv.db.daten.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Alex
 */
@Entity
@Table(name = "BENOTUNGEN")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Benotungen.findAll", query = "SELECT b FROM Benotungen b"),
    @NamedQuery(name = "Benotungen.findById", query = "SELECT b FROM Benotungen b WHERE b.id = :id"),
    @NamedQuery(name = "Benotungen.findBySch\u00fclerid", query = "SELECT b FROM Benotungen b WHERE b.sch\u00fclerid = :sch\u00fclerid"),
    @NamedQuery(name = "Benotungen.findByFachid", query = "SELECT b FROM Benotungen b WHERE b.fachid = :fachid"),
    @NamedQuery(name = "Benotungen.findByBenotungsname", query = "SELECT b FROM Benotungen b WHERE b.benotungsname = :benotungsname"),
    @NamedQuery(name = "Benotungen.findByBenotungsnote", query = "SELECT b FROM Benotungen b WHERE b.benotungsnote = :benotungsnote")})
public class Benotungen implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private BigDecimal id;
    @Basic(optional = false)
    @Column(name = "SCH\u00dcLERID")
    private BigDecimal schülerid;
    @Basic(optional = false)
    @Column(name = "FACHID")
    private BigDecimal fachid;
    @Basic(optional = false)
    @Column(name = "BENOTUNGSNAME")
    private String benotungsname;
    @Basic(optional = false)
    @Column(name = "BENOTUNGSNOTE")
    private float benotungsnote;

    public Benotungen() {
    }

    public Benotungen(BigDecimal id) {
        this.id = id;
    }

    public Benotungen(BigDecimal id, BigDecimal schülerid, BigDecimal fachid, String benotungsname, int benotungsnote) {
        this.id = id;
        this.schülerid = schülerid;
        this.fachid = fachid;
        this.benotungsname = benotungsname;
        this.benotungsnote = benotungsnote;
    }

    public BigDecimal getId() {
        return id;
    }

    public void setId(BigDecimal id) {
        this.id = id;
    }

    public BigDecimal getSchülerid() {
        return schülerid;
    }

    public void setSchülerid(BigDecimal schülerid) {
        this.schülerid = schülerid;
    }

    public BigDecimal getFachid() {
        return fachid;
    }

    public void setFachid(BigDecimal fachid) {
        this.fachid = fachid;
    }

    public String getBenotungsname() {
        return benotungsname;
    }

    public void setBenotungsname(String benotungsname) {
        this.benotungsname = benotungsname;
    }

    public float getBenotungsnote() {
        return benotungsnote;
    }

    public void setBenotungsnote(float benotungsnote) {
        this.benotungsnote = benotungsnote;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Benotungen)) {
            return false;
        }
        Benotungen other = (Benotungen) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "skv.db.daten.entities.Benotungen[ id=" + id + " ]";
    }
    
}
